<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Builder;

class YiNew extends Model
{
    use HasFactory;
	
	protected $guarded = ['id'];
	
	protected $casts = [
		'data' => 'json'
	];

    public function getTableName() {
        return $this->getTable();
    }

    public function programImages()
    {
        return $this->hasMany(ProgramImage::class, 'deep_new_id', 'id');
    }

    public function mpWeixinCompany()
    {
        return $this->hasOne(MpWeixinCompany::class,"fakeid","mp_biz");
    }
}
